﻿

using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using RBAC.api.Application.commond.deepprocessing;
using RBAC.Common.Domains.RabbitProject;
using RBAC.Common.Dto;
using RBAC.Common.Dto.ProSorce;
using RBAC.Common.MYcontexts;
using RBAC.Enum;






namespace RBAC.api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class DeepprocessingController1 : ControllerBase
    {

        private readonly IMediator _mediator;
        private readonly EFMycontext _mycontext;


   

        public DeepprocessingController1(IMediator mediator, EFMycontext _mycontext)
        {
            _mediator = mediator;
            this._mycontext= _mycontext;


        }

        /// <summary>
        /// 班组负责人添加AU
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// 
        [HttpPost]
        public async Task<Rulst> Deepprocessing(DeepprocessingCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);
            


            return query;



        }
        /// <summary>
        /// 公司+生产许可证AU
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> DeepprocessingBoss(DeepprocessingBossCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);

            return query;
        }
        /// <summary>
        /// 生产批次AU
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> DeepprocessingLot(DeepprocessingLotCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);


            return  query;


        }
        /// <summary>
        /// 食品图片添加
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> DeepprocessingImages(DeepprocessingImagesCommond request, CancellationToken cancellationToken)
        {


            var query = await _mediator.Send(request);

            return query;

        }
        /// <summary>
        /// 相关资质
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> DeepprocessingImagesGET(DeepprocessingImagesGETTwoCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);


            return query;
        }

        /// <summary>
        /// 加工企业照片
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> DeepprocessingImagesJoker(DeepprocessingImagesJokerCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);

            return query;
        }
        /// <summary>
        /// 深加工显示
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> DeepprocessHTML(DeepprocessHTMLCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);
            return query;


        }


        





      

    }
}
